Disable tpo for now.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 31 Oct 2005 22:25:08 +0000 (22:25 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 31 Oct 2005 22:25:08 +0000 (22:25 +0000)
gpsbabel/tpo.README.patch [new file with mode: 0644]
gpsbabel/tpo.c
gpsbabel/tpo.testo.patch [new file with mode: 0644]

diff --git a/gpsbabel/tpo.README.patch b/gpsbabel/tpo.README.patch
new file mode 100644 (file)
index 0000000..048b4c5
--- /dev/null
@@ -0,0 +1,51 @@
+Index: README
+===================================================================
+RCS file: /cvsroot/gpsbabel/gpsbabel/README,v
+retrieving revision 1.145
+diff -p -u -r1.145 README
+--- README     26 Oct 2005 23:54:45 -0000      1.145
++++ README     31 Oct 2005 22:21:04 -0000
+@@ -467,9 +467,10 @@ THE FORMATS
+     TPG
+-      National Geographic Topo! Waypoint Format.  This filter 
+-      reads and writes .TPG files created by various editions of NG Topo! 
+-      This filter will *not* work with the newer combined .TPO files.  
++        National Geographic Topo! Waypoint and Route Format.  This
++        format reads and writes .TPG files created by various editions
++        of NG Topo!  This filter will *not* work with the newer combined
++        .TPO files.  Reading/writing of route data is not supported yet.
+         The option 'datum="datum name"' can be used to override the
+         default of NAD27 ("N. America 1927 mean") which is correct
+@@ -478,6 +479,29 @@ THE FORMATS
+       Contributed by Alex Mottram.
++    TPO
++
++        National Geographic Topo! Track Format.  This format reads
++        and writes .TPO files created by various editions of NG Topo!
++        version 2.7.7 or earlier. This format will *not* work with the
++        newer .TPO files (version 3.0 and later) that have TPG data
++        combined into them.
++
++        When writing TPO files, note that every TOPO! state edition
++        employs a slightly different data format, so you will need to
++        specify which state edition to generate output for.  The current
++        supported states are CA, NY, NJ, MA, CT, RI, NH, VT, ME.  It's
++        fairly easy to add support for additional states. Instructions
++        are in the source code.
++
++      Additional options:
++      dumpheader    -    (0/1) Display the file header bytes (useful when
++                              adding support for a new state)
++      state        -    State map format to write, default=CA
++      
++      Contributed by Steve Chamberlin.
++
++
+     HOLUX
+         The Holuxgm-100 (e-fox) gps receiver uses standard compact
index 8ee9e454ebd2d207d16b5c25de6dae3cd4c5a603..4aa097896d2938a4957ffc4e69f298b7faa27860 100644 (file)
 
  */
 
+
+/*
+ ***** This format has problems and the author hasn't returned emails
+ * on it, so we've set the format type to 'ff_type_internal' to make it
+ * disappear from the various lists...
+ */
+ */
+
+
 #include "defs.h"
 #include <string.h>
 #include <ctype.h>
@@ -668,7 +677,7 @@ tpo_track_disp(const waypoint *waypointp)
        double lat, lon, amt, x, y, z;
        short lat_delta, lon_delta;
     unsigned char temp_buffer[2];
-       
+// fprintf(stderr, "%f/%f\n", waypointp->latitude, waypointp->longitude);
        /* convert lat/lon position to XYZ meters */
        GPS_Math_WGS84LatLonH_To_XYZ(
                waypointp->latitude, 
@@ -708,6 +717,7 @@ tpo_track_disp(const waypoint *waypointp)
        /* latitude delta from first route point */
        lat_delta = (short)((first_track_waypoint_lat - lat) / output_track_lat_scale);
        le_write16(temp_buffer, lat_delta);
+fprintf(stderr, "%f %f: %x %x - %f %f %f / %f\n", lon, lat, lon_delta, lat_delta, first_track_waypoint_lat, lat, output_track_lat_scale, (first_track_waypoint_lat - lat) );
        fwrite(temp_buffer, 1, 2, tpo_file_out);
 }
 
@@ -791,7 +801,7 @@ tpo_write(void)
 
 /* TPO format can read and write tracks only */
 ff_vecs_t tpo_vecs = {
-       ff_type_file,
+ff_type_internal, //   ff_type_file,
        { ff_cap_none | ff_cap_none, ff_cap_read | ff_cap_write, ff_cap_none | ff_cap_none },
        tpo_rd_init,
        tpo_wr_init,
diff --git a/gpsbabel/tpo.testo.patch b/gpsbabel/tpo.testo.patch
new file mode 100644 (file)
index 0000000..1dec24c
--- /dev/null
@@ -0,0 +1,27 @@
+Index: testo
+===================================================================
+RCS file: /cvsroot/gpsbabel/gpsbabel/testo,v
+retrieving revision 1.110
+diff -p -u -r1.110 testo
+--- testo      26 Oct 2005 23:11:21 -0000      1.110
++++ testo      31 Oct 2005 22:23:33 -0000
+@@ -172,6 +172,19 @@ ${PNAME} -i tpg -f ${TMPDIR}/geo.tpg -o 
+ ${PNAME} -i tpg -f reference/tpg.tpg -o mxf -F ${TMPDIR}/topo.mxf
+ compare ${TMPDIR}/tpg.mxf ${TMPDIR}/topo.mxf
++# TPO (NG Topo!) file format
++# This is hard to test because the datum conversions create minute
++# inconsistencies in the coordinates. We have four reference files:
++# sample1.tpo, sample1.gpx, sample2.gpx, and sample2.tpo. These are
++# used to check the conversion to and from TPO format.
++rm -f ${TMPDIR}/sample1.gpx ${TMPDIR}/sample2.tpo
++${PNAME} -t -i tpo -f reference/track/sample1.tpo -o gpx -F ${TMPDIR}/sample1.gpx
++compare ${TMPDIR}/sample1.gpx reference/track/sample1.gpx
++${PNAME} -t -i gpx -f reference/track/sample2.gpx -o tpo -F ${TMPDIR}/sample2.tpo
++bincompare ${TMPDIR}/sample2.tpo reference/track/sample2.tpo
++
++
++
+ # OZI (OziExplorer 1.1) file format
+ rm -f ${TMPDIR}/oz.wpt ${TMPDIR}/ozi.wpt
+ ${PNAME} -i ozi -f reference/ozi.wpt -o ozi -F ${TMPDIR}/oz.wpt